\(\int \cot ^6(a+b x) \, dx\) [6]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 45 \[ \int \cot ^6(a+b x) \, dx=-x-\frac {\cot (a+b x)}{b}+\frac {\cot ^3(a+b x)}{3 b}-\frac {\cot ^5(a+b x)}{5 b} \]

[Out]

-x-cot(b*x+a)/b+1/3*cot(b*x+a)^3/b-1/5*cot(b*x+a)^5/b

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 8} \[ \int \cot ^6(a+b x) \, dx=-\frac {\cot ^5(a+b x)}{5 b}+\frac {\cot ^3(a+b x)}{3 b}-\frac {\cot (a+b x)}{b}-x \]

[In]

Int[Cot[a + b*x]^6,x]

[Out]

-x - Cot[a + b*x]/b + Cot[a + b*x]^3/(3*b) - Cot[a + b*x]^5/(5*b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps \begin{align*} \text {integral}& = -\frac {\cot ^5(a+b x)}{5 b}-\int \cot ^4(a+b x) \, dx \\ & = \frac {\cot ^3(a+b x)}{3 b}-\frac {\cot ^5(a+b x)}{5 b}+\int \cot ^2(a+b x) \, dx \\ & = -\frac {\cot (a+b x)}{b}+\frac {\cot ^3(a+b x)}{3 b}-\frac {\cot ^5(a+b x)}{5 b}-\int 1 \, dx \\ & = -x-\frac {\cot (a+b x)}{b}+\frac {\cot ^3(a+b x)}{3 b}-\frac {\cot ^5(a+b x)}{5 b} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.02 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.73 \[ \int \cot ^6(a+b x) \, dx=-\frac {\cot ^5(a+b x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-\tan ^2(a+b x)\right )}{5 b} \]

[In]

Integrate[Cot[a + b*x]^6,x]

[Out]

-1/5*(Cot[a + b*x]^5*Hypergeometric2F1[-5/2, 1, -3/2, -Tan[a + b*x]^2])/b

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.87

method result size
parallelrisch \(\frac {-3 \cot \left (b x +a \right )^{5}+5 \cot \left (b x +a \right )^{3}-15 b x -15 \cot \left (b x +a \right )}{15 b}\) \(39\)
derivativedivides \(\frac {-\frac {\cot \left (b x +a \right )^{5}}{5}+\frac {\cot \left (b x +a \right )^{3}}{3}-\cot \left (b x +a \right )+\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )}{b}\) \(46\)
default \(\frac {-\frac {\cot \left (b x +a \right )^{5}}{5}+\frac {\cot \left (b x +a \right )^{3}}{3}-\cot \left (b x +a \right )+\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (b x +a \right )\right )}{b}\) \(46\)
norman \(\frac {-\frac {1}{5 b}+\frac {\tan \left (b x +a \right )^{2}}{3 b}-\frac {\tan \left (b x +a \right )^{4}}{b}-x \tan \left (b x +a \right )^{5}}{\tan \left (b x +a \right )^{5}}\) \(53\)
risch \(-x -\frac {2 i \left (45 \,{\mathrm e}^{8 i \left (b x +a \right )}-90 \,{\mathrm e}^{6 i \left (b x +a \right )}+140 \,{\mathrm e}^{4 i \left (b x +a \right )}-70 \,{\mathrm e}^{2 i \left (b x +a \right )}+23\right )}{15 b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{5}}\) \(70\)

[In]

int(cot(b*x+a)^6,x,method=_RETURNVERBOSE)

[Out]

1/15*(-3*cot(b*x+a)^5+5*cot(b*x+a)^3-15*b*x-15*cot(b*x+a))/b

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (41) = 82\).

Time = 0.27 (sec) , antiderivative size = 123, normalized size of antiderivative = 2.73 \[ \int \cot ^6(a+b x) \, dx=-\frac {23 \, \cos \left (2 \, b x + 2 \, a\right )^{3} - \cos \left (2 \, b x + 2 \, a\right )^{2} + 15 \, {\left (b x \cos \left (2 \, b x + 2 \, a\right )^{2} - 2 \, b x \cos \left (2 \, b x + 2 \, a\right ) + b x\right )} \sin \left (2 \, b x + 2 \, a\right ) - 11 \, \cos \left (2 \, b x + 2 \, a\right ) + 13}{15 \, {\left (b \cos \left (2 \, b x + 2 \, a\right )^{2} - 2 \, b \cos \left (2 \, b x + 2 \, a\right ) + b\right )} \sin \left (2 \, b x + 2 \, a\right )} \]

[In]

integrate(cot(b*x+a)^6,x, algorithm="fricas")

[Out]

-1/15*(23*cos(2*b*x + 2*a)^3 - cos(2*b*x + 2*a)^2 + 15*(b*x*cos(2*b*x + 2*a)^2 - 2*b*x*cos(2*b*x + 2*a) + b*x)
*sin(2*b*x + 2*a) - 11*cos(2*b*x + 2*a) + 13)/((b*cos(2*b*x + 2*a)^2 - 2*b*cos(2*b*x + 2*a) + b)*sin(2*b*x + 2
*a))

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.87 \[ \int \cot ^6(a+b x) \, dx=\begin {cases} - x - \frac {\cot ^{5}{\left (a + b x \right )}}{5 b} + \frac {\cot ^{3}{\left (a + b x \right )}}{3 b} - \frac {\cot {\left (a + b x \right )}}{b} & \text {for}\: b \neq 0 \\x \cot ^{6}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(cot(b*x+a)**6,x)

[Out]

Piecewise((-x - cot(a + b*x)**5/(5*b) + cot(a + b*x)**3/(3*b) - cot(a + b*x)/b, Ne(b, 0)), (x*cot(a)**6, True)
)

Maxima [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.98 \[ \int \cot ^6(a+b x) \, dx=-\frac {15 \, b x + 15 \, a + \frac {15 \, \tan \left (b x + a\right )^{4} - 5 \, \tan \left (b x + a\right )^{2} + 3}{\tan \left (b x + a\right )^{5}}}{15 \, b} \]

[In]

integrate(cot(b*x+a)^6,x, algorithm="maxima")

[Out]

-1/15*(15*b*x + 15*a + (15*tan(b*x + a)^4 - 5*tan(b*x + a)^2 + 3)/tan(b*x + a)^5)/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (41) = 82\).

Time = 0.27 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.02 \[ \int \cot ^6(a+b x) \, dx=\frac {3 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{5} - 35 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{3} - 480 \, b x - 480 \, a - \frac {330 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} - 35 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 3}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{5}} + 330 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )}{480 \, b} \]

[In]

integrate(cot(b*x+a)^6,x, algorithm="giac")

[Out]

1/480*(3*tan(1/2*b*x + 1/2*a)^5 - 35*tan(1/2*b*x + 1/2*a)^3 - 480*b*x - 480*a - (330*tan(1/2*b*x + 1/2*a)^4 -
35*tan(1/2*b*x + 1/2*a)^2 + 3)/tan(1/2*b*x + 1/2*a)^5 + 330*tan(1/2*b*x + 1/2*a))/b

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.80 \[ \int \cot ^6(a+b x) \, dx=-x-\frac {\frac {{\mathrm {cot}\left (a+b\,x\right )}^5}{5}-\frac {{\mathrm {cot}\left (a+b\,x\right )}^3}{3}+\mathrm {cot}\left (a+b\,x\right )}{b} \]

[In]

int(cot(a + b*x)^6,x)

[Out]

- x - (cot(a + b*x) - cot(a + b*x)^3/3 + cot(a + b*x)^5/5)/b